// 商品·API
import requests from '@/utis/request'

export const findProduct = (id) => {
    return requests('/goods','get',{id})
}


// id 传入相关推荐  不传猜你喜欢
// limit 请求的商品数量
export const findRelaventGoods = (id, limit=10)=>{
    return requests('/goods/relevant','get',{id,limit})
}

// 获取商品热销榜数据
export const findGoodsHot = (id, limit=3, type=1)=>{
    return requests('/goods/hot','get',{id,limit, type})
}

// 商品评价头部数据
// axios 遇见 http:// https:// 开头 不会加上baseUrl
export const findGoodsCommentInfo = (id,) => {
    return requests(`https://mock.boxuegu.com/mock/1175/goods/${id}/evaluate`, 'get')
}

//  查询商品评价列表
export const findGoodsCommentList = (id, params) => {
    return requests(`https://mock.boxuegu.com/mock/1175/goods/${id}/evaluate/page`, 'get', params)
  }